#ifndef CARAMA_H
#define CARAMA_H

// 封装一下carama 这玩意是videx x不确定
#define FRAMEBUFFER_COUNT 10 //帧缓冲数量


/*** 摄像头像素格式及其描述信息 ***/
typedef struct camera_format {
 unsigned char description[32]; //字符串描述信息
 unsigned int pixelformat; //像素格式
} cam_fmt;

/*** 描述一个帧缓冲的信息 ***/
typedef struct cam_buf_info {
 unsigned short *start; //帧缓冲起始地址
 unsigned long length; //帧缓冲长度
} cam_buf_info;


//897897

int v4l2_dev_init(const char* device);
void v4l2_enum_format(int v4l2_fd);
void v4l2_print_format(int v4l2_fd);
int v4l2_set_format(int v4l2_fd,struct v4l2_format* fmt,unsigned char fps);
int v4l2_init_buffer(int v4l2_fd);
int v4l2_stream_on(int v4l2_fd);
#endif